<html>
     <head>
          <style>
               @page { margin: 15px 50px; }
               #header 
               {
                    left: 0px; 
                    top: -140px; 
                    right: 0px; 
                    /*height: 130px;*/ 
                    text-align: center; 
                    
                    margin:4px auto;
                    border-bottom:1px solid #666;
               }
               #logogogo{width:68px;float:left;}
               #header p
               {
                    font-size:10px;
                    font-family: Times New Roman;
					margin:0;
               }

               #header h1
               {
                    color:#666; 
                    font-weight:lighter;
                    margin:0 0 0 0;
                    font-family: Times New Roman;
					font-size	: 20px;
               }
			   #header h3
			   {
				
                    font-weight:lighter;
                    font-family: Helvetica;
			   }
               body{
                    outline:none;
                    font-family:sans-serif, Arial, Helvetica, sans-serif; 
                    font-size:88%;
                    /*line-height: 20px;*/
               }
			   .table-tengah td
			   {
				text-align	: center;
			   }
               table {
                    max-width: 100%;
                    border-collapse: collapse;
                    border-spacing: 0;
					font-size	: 12px;
               }
               .table {
                    width: 100%;
                    margin-bottom: 18px;
               }
               .table th, .table td {
                    padding: 8px;
                    line-height: 18px;
                    text-align: left;
                    border-top: 1px solid #ddd;
               }
               .table th {
                    font-weight: bold;
                    vertical-align: center;
               }
               .table td {
                    vertical-align: center;
					font-size	: 10px;
               }
               .table thead:first-child tr th, .table thead:first-child tr td {
                    border-top: 0;
               }
               .table tbody + tbody {
                    border-top: 2px solid #ddd;
               }
               .table-condensed th, .table-condensed td {
                    padding: 4px 5px;
               }
               .table-bordered {
                    border: 1px solid #ddd;
                    border-collapse: separate;
                    -webkit-border-radius: 4px;
                    -moz-border-radius: 4px;
                    border-radius: 4px;
               }
               .table-bordered th + th,
               .table-bordered td + td,
               .table-bordered th + td,
               .table-bordered td + th {
                    border-left: 1px solid #ddd;
               }
               .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
                    border-top: 0;
               }
               .table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
                    -webkit-border-radius: 4px 0 0 0;
                    -moz-border-radius: 4px 0 0 0;
                    border-radius: 4px 0 0 0;
               }
               .table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
                    -webkit-border-radius: 0 4px 0 0;
                    -moz-border-radius: 0 4px 0 0;
                    border-radius: 0 4px 0 0;
               }
               .table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child {
                    -webkit-border-radius: 0 0 0 4px;
                    -moz-border-radius: 0 0 0 4px;
                    border-radius: 0 0 0 4px;
               }
               .table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child {
                    -webkit-border-radius: 0 0 4px 0;
                    -moz-border-radius: 0 0 4px 0;
                    border-radius: 0 0 4px 0;
               }
			   .table-striped tr
			   {
                    border : 1px solid;
			   }
               .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
					// background-color: #f9f9f9;
               }
			   .table-bordered th
			   {
				font-size	: 11px;
			   }
			   .table-bordered td
			   {
				font-size	: 10px;
			   }
			   .table-nilai
			   {
				border-collapse	: collapse;
			   }
			   .table-nilai th
			   {
				background-color	: #f9f9f9;
				font-size	: 10px;
			   }
			   .table-nilai td
			   {
				font-size	: 9px;
			   }
          </style>
     </head>
          <body>
               <div id="header">
                    <span id="logogogo"><?php echo image_thumb("data/gambar/Logo-SMAN-1-Kota-Sukabumi.png", 100, 100) ?></span>
                    <h1>SEKOLAH MENENGAH NEGERI 1 KOTA SUKABUMI</h1>
                    <p>Jalan RH. Didi Sukardi No. 124 Telp. (0266) 221371 Kode Pos : 43143<br/>Kota Sukabumi</p>
					<h3>Daftar Hadir Siswa <?php echo $data_siswa->row()->tahun_angkatan ?> Kelas <?php echo $data_siswa->row()->nama_kelas ?> </h3>
               </div>
               <!--header-->
			   <div style="float:left;width:49%">
			   <table width="100%">
			   <tr>
					<td>Tahun Angkatan</td>
					<td>:</td>
					<td><?php echo $data_siswa->row()->tahun_angkatan ?></td>
			   </tr>
			   <tr>
					<td>Jurusan</td>
					<td>:</td>
					<td><?php echo $data_siswa->row()->status_kelas ?></td>
			   </tr>
			   <tr>
					<td>Tingkat Kelas</td>
					<td>:</td>
					<td><?php echo $data_siswa->row()->tingkat_kelas ?></td>
			   </tr>
			   </table>
			   </div>
			   <div style="float:right;width:49%">
			   <table width="100%">
			   <tr>
					<td>Kelas</td>
					<td>:</td>
					<td><?php echo $data_siswa->row()->nama_kelas ?></td>
			   </tr>
			   <tr>
					<td>Nama Wali Kelas</td>
					<td>:</td>
					<td><?php echo $data_siswa->row()->nama_guru ?></td>
			   </tr>
			   <tr>
					<td>Nomor Induk Guru</td>
					<td>:</td>
					<td><?php echo $data_siswa->row()->nip ?></td>
			   </tr>
			   </table>
			   </div>
			   <div style="clear:both"></div>
			   <br/>
			   <table class="table-condensed table-bordered table-nilai table-striped" border="0" width="100%">
				<tr>
					<th rowspan="2" width="3%">No.</th>
					<th rowspan="2" width="8%">Nomor Induk Siswa</th>
					<th rowspan="2" width="15%">Nama Siswa</th>
					<th rowspan="2" width="3%">Jenis Kelamin</th>
					<th colspan="24">Pertemuan Ke-</th>
					<th rowspan="2" width="10%">Keterangan</th>
				</tr>
				<tr>
					<?php
						$i = 0;
						while($i < 24)
						{
							$i++;
							echo '<th width="2%">'.$i.'</th>';
						}
					?>
				</tr>
				<?php
					$nomor = 0;
					$siswa_l = 0;
					$siswa_p = 0;
					foreach($data_siswa->result() as $v_siswa)
					{
						$nomor++;
						echo '<tr>';
						echo '<td>'.$nomor.'</td>';
						echo '<td>'.$v_siswa->nomor_induk.'</td>';
						echo '<td>'.$v_siswa->nama_siswa.'</td>';
						echo '<td><center>'.$v_siswa->jenis_kelamin.'</center></td>';
						$i = 0;
						while($i <= 24)
						{
							$i++;
							echo '<td></td>';
						}
						echo '</tr>';
						
						if($v_siswa->jenis_kelamin == 'L')$siswa_l++;
						elseif($v_siswa->jenis_kelamin == 'P')$siswa_p++;
					}
				?>
			   </table>
			   
			   <br/>
			   <div style="float:left;width:80%;">
			   <table class="table-bordered" width="50%">
				<tr>
					<td colspan="2">Keterangan</td>
				</tr>
				<tr>
					<td>Siswa Laki-Laki</td>
					<td><?php echo $siswa_l ?></td>
				</tr>
				<tr>
					<td>Siswa Perempuan</td>
					<td><?php echo $siswa_p ?></td>
				</tr>
				<tr>
					<td>Total Siswa Terdata</td>
					<td><?php echo $data_siswa->num_rows() ?></td>
				</tr>
			   </table>
			   </div>
			   <div style="float:right;width:49%;">
			   <table>
				<tr>
					<td><?php echo 'Sukabumi, ' ?></td>
				</tr>
				<tr>
					<td><?php echo 'Wali Kelas '.$data_siswa->row()->nama_kelas ?> </td>
				</tr>
				<tr><td style="height:80px;"></td></tr>
				<tr>
					<td><?php echo $data_siswa->row()->nama_guru ?></td>
				</tr>
				<tr>
					<td><?php echo $data_siswa->row()->nip ?></td>
				</tr>
			   </table>
			   </div>
	</body>
</html>